<template>
	<view class="">
		<u-toast ref="ucToast"></u-toast>
		<!-- 交易确认弹窗-->
		<u-popup :show="moneyShow" :closeable='false' bgColor='transparent' mode="center" @close="close" round="60rpx"
			:closeOnClickOverlay='true'>
			<view class="popup-box flex-col justify-between align-center">
				<view class="nav-title  ">

					<view class="title ">
						选择支付方式
					</view>
				<view class="pay-box flex-col justify-between">
					<view class="pay-type justify-between align-center" @tap="onSelect(0)">
						<view class="justify-start align-center">
							<image class="pay-icon" src="/static/images/car/core-icon.png" mode=""></image>
							<view class="pay-num ">
								<view class="">
									积分：{{accountInfo.integral_price}}<text style="font28">（剩余{{accountInfo.integral}}积分）</text>
								</view>
								<view class="type_tips1" v-if="accountInfo.vip_id" >
									{{accountInfo.vip_name}}
								</view>
							</view>
						</view>
						<view class="radio "
						>
						<!-- :style="{}" -->
							<view class="checked " v-if="type==0">
								
							</view>
						</view>
					</view>
					<view class="pay-type justify-between align-center border-t-b" @tap="onSelect(1)">
						<view class="justify-start align-center">
							<image class="paywx-icon" src="/static/images/car/wx-icon.png" mode=""></image>
							<view class="">
								微信：{{accountInfo.price}} 元
							</view>
						</view>
						<view class="radio">
							<view class="checked " v-if="type==1">
								
							</view>
						</view>
					</view>
					<view class="pay-type justify-between align-center" >
						<view class="justify-start align-center">
							<image class="paycard-icon" src="/static/images/car/card-icon.png" mode=""></image>
							<view class="">
								权益卡 <text class="type_tips3">暂无可用权益卡</text>
							</view>
						</view>
						<!-- <view class="radio">
							
						</view> -->
						<view class="disabled">
							
						</view>
					</view>
				</view>
				</view>
				
				<u-toast ref="uToastInfo"></u-toast>
				<!-- {{carNote}} -->

				<view class="pull-info align-center justify-center" @click="pay">
					确定
				</view>
			</view>
		</u-popup>

	</view>

</template>

<script>
	import {
		host
	} from '@/config/config.js';
	export default {
		components: {
			// 注册组件

		},
		props: {
			isShow: {
				type: Boolean,
				default: false,
			},
			signInfo: {
				type: Object,
				default: () => {
					return {
						desc: '早起的鸟儿有虫吃!09:00将结算奖励并自动发放至您的账户中。',
						continuous: 0,
					}
				},
			},
			num: {
				type: Number,
				default: 1,
			},
			accountInfo: {
				type: Object,
				default: ()=>{},
			}
		},
		data() {
			return {
				host,
				type:0,
				value: '',
				checked: true,
				number: 1,
				moneyShow: false,
				parsswordShow: false,
				loading: false,
				captcha: {
					id: '',
					img: '',
					captcha: "",
				},
			}
		},
		computed: {

		},
		watch: {
			// isShow(val) {
			// 	console.log(val, 'modal');
			// 	this.moneyShow = val
			// 	if (val) {}
			// },

			isShow: {
				handler: function(o, val) {
					this.moneyShow = o
				},
				deep: true, // 深度监听
				immediate: true, // 立即执行
			}
		},
		created() {},
		methods: {
			onSelect(type){
				// 支付方式:0=积分,1=微信,2=权益卡
				this.type = type
			},
			close() {
				this.$emit('close')
			},
			pay() {
				this.$emit('pay',this.type)
				// this.$navto('/car/order/pay-status')
			},
		}
	}
</script>

<style>
	@import '/common/css/common.css';
</style>
<style lang="scss" scoped>
	.popup-box {
		width: 670rpx;
		// height: 556rpx;
		padding: 30rpx 30rpx 49rpx;
		background: #FCFCFC;
		box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(108, 108, 108, 0.1);
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		.pay-box{
			.pay-type{
				height: 100rpx;
				.pay-num{
					font-weight: 500;
					font-size: 32rpx;
					color: #000000;
					.type_tips1{
						margin-top: 21rpx;
						text-align: left;
						font-weight: 500;
						font-size: 24rpx;
						color: #CC1D1D;
					}
				}
				.type_tips3{
					margin-left: 19rpx;
					font-family: Source Han Sans CN, Source Han Sans CN;
					font-weight: 400;
					font-size: 24rpx;
					color: #8E8E8E;
				}
			}
			.border-t-b{
				border-top: 1rpx solid rgba(0,0,0,0.1);
				border-bottom: 1rpx solid rgba(0,0,0,0.1);
			}
			.disabled{
				width: 55rpx;
				height: 55rpx;
				background: #D9D9D9;
				border-radius: 50%;
			}
			.radio{
				width: 55rpx;
				height: 55rpx;
				border-radius: 50%;
				border: 2rpx solid #454545;
				position: relative;
				.checked{
					position: absolute;
					top: 0%;
					left: 0%;
					transform: translate(7rpx,7rpx);
					width: 41rpx;
					height: 41rpx;
					background: #CC1D1D;
					border-radius: 50%;
				}
			}
			.pay-icon{
				width: 46rpx;
				height: 46rpx;
				margin-right: 25rpx;
			}
			.paywx-icon{
				width: 48rpx;
				height: 42rpx;
				margin-right: 25rpx;
			}
			.paycard-icon{
				width: 47rpx;
				height: 35rpx;
				margin-right: 22rpx;
			}
		}
		.nav-title {
			width: 100%;
			text-align: center;
			margin-bottom: 20rpx;


			.title {
				text-align: center;
				font-weight: 400;
				font-size: 30rpx;
				color: #000000;
				margin-bottom: 38rpx;
			}

		}

		.pull-info {
			width: 280rpx;
			height: 90rpx;
			background: #CC1D1D;
			border-radius: 10rpx 10rpx 10rpx 10rpx;
			font-weight: 400;
			font-size: 36rpx;
			color: #FFFFFF;
		}
	}
</style>